<a href="#" onclick="calculateCoordinates();$('region_form').onsubmit();this.innerHTML='Saving...';return false;">Save</a>
<%= link_to_function("Cancel", update_page{|page| page.redirect_to(:controller => (@cancel_controller ? @cancel_controller : "ecases"), :action => "show", :id => @cancel_id ?  @cancel_id : params[:id])} )%>

 